package com.junzhiit.nengji.shop.model.enums;

import com.bainaeco.framework.exception.InvalidArgumentException;

public enum MemberCardHistoryStatus {
	WAIT(0,"待支付"),
	PAID(1,"已支付");
	private Integer value;
	private String text;
	
	private MemberCardHistoryStatus(Integer value,String text){
		this.value=value;
		this.text=text;
	}
	public Integer toIntValue(){
		return this.value;
	}
	public String toStringText(){
		return this.text;
	}
	public static MemberCardHistoryStatus toValue(int value){
		if (WAIT.value == value) {
			return WAIT;
		} else if (PAID.value == value) {
			return PAID;
		} else {
			throw new InvalidArgumentException("Unknown status[" + value + "].");
		}
	}
}
